#pragma once

#include "GraphicControlMedia.h"
#include "ListFileMultiMedia.h"
#include "GraphicShowVideo.h"
#include "GraphicSubTitle.h"
#include "VideoPlayerManager.h"
#include "MediaObject.h"
#include "afxwin.h"
#include "afxcmn.h"




// CMultiMediaDlg dialog
class CMultiMediaDlg : public CDialog
{
// Construction
public:
	CMultiMediaDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_MULTIMEDIA_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()

public:
    CRect m_rectParentDlg;
	CRect	m_rtPlayer;
	CRect GetCRectFromRECT(RECT lpRECT);
	Rect  GetRectFromRECT(RECT lpRECT);

	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	virtual BOOL PreTranslateMessage(MSG* pMsg);


public:
	CMenu m_Cmenu;
	GraphicControlMedia   m_gControlMedia;
	ListFileMultiMedia    m_gListFileMultiMedia;
	GraphicShowVideo      m_gShowVideo;
	VideoPlayerManager    m_VideoMng;
    

	CString               m_strFileName;
    CString               m_strFilePath;
	int		              nCount;
	int					  m_nNumOfPlaylist;
	int					  m_nOldNumNumOfPlaylist;
	int	                  m_nVol;
	bool	              m_bAvoidReplayWhenAddFile;
   CArray<MediaObject,MediaObject&> MediaObjects;
   void MediaPlay();

  
	

	afx_msg void OnFileOpenfile();
	static CMultiMediaDlg* ShareInstance();
	void UpdateVideoScreen(void);
	//virtual BOOL PreTranslateMessage(MSG* pMsg);
};
